Digital exposure circuit for an image sensor

ABSTRACT

Automatic exposure adjusting device considers the image on a pixel-by-pixel basis. Each pixel is characterized according to its most significant bits. After the pixels are characterized, the number of pixels in any particular group is counted. That counting is compared with thresholds which set whether the image is over exposed, under exposed, and can optionally also determine if the image is seriously over exposed or seriously under exposed. Adjustment of the exposure is carried out to bring the image to a more desired state.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of the U.S. Provisional ApplicationNo. 60/082,793, filed on Apr. 23, 1998.

BACKGROUND OF THE INVENTION

CMOS active pixel sensors represent a digital solution to obtaining animage of an impinging scene. CMOS technology enables integratingelectronics associated with the image sensing onto the chip. Thisincludes, for example, one or more analog-to-digital converters on thechip, as well as timing and control circuitry.

One important feature of a well-defined image is an amount of exposure.Some cameras include automatic gain and exposure control. The automaticgain and exposure control determines if the image is underexposed oroverexposed, and can adjust some feature of the image acquisition tocorrect the exposure amount.

Existing CCD cameras select the exposure time based on some feature ofthe scene being imaged. Some cameras, for example, compute the averageintensity over the entire pixel array. Other cameras compute the averageintensity over a central area of the CCD. The average is oftencalculated by a digital signal processor which is separate from the CCDchip.

SUMMARY OF THE INVENTION

The present system teaches a programmable threshold indicator based onaccumulated and programmable measurements of image pieces. The digitalimage data stream is analyzed by the counting the number of sampleswithin a given interval of intensities to form information indicating animage histogram. The sample count is compared with programmablethresholds.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 shows a basic block diagram;

FIG. 2 shows a flowchart of operation of a two-threshold embodiment;

FIG. 3 shows a point diagram of the FIG. 2 embodiment;

FIG. 4 shows a flowchart of a second, three-threshold embodiment;

FIG. 5 shows a point chart;

FIG. 6 shows exemplary circuitry for carrying out this embodiment; and

FIG. 7 shows results of simulation.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The inventors recognize that in some particular images, exposure controlby simply computing the average of the image could producedisadvantageous results. For example, consider a scene of black andwhite stripes. Fifty percent of the image could be very bright, and theother fifty percent could be completely dark. The average is fiftypercent which could be considered the correct exposure. Both imageportions from the bright scene and the dark scene, however, could bepoor.

The present system provides a programmable threshold indicator based onmeasurements of various portions of the image. A block diagram of thesystem is shown in FIG. 1.

Active pixel image sensor 100 includes an array of units, e.g., rows andcolumns, of CMOS active pixels. Each preferably includes an in-pixelbuffer transistor configured as a source follower, and an in-pixel rowor column select transistor. The output of the sensor can be providedeither single pixel at a time, or as a parallel group of pixel units 102to the analog-to-digital converter 104. ADC 104 preferably produces an8-bit output 106. The two to three most-significant bits of theanalog-to-digital converter are usually enough to analyze intensitydistribution.

The three most-significant bits 108 are coupled to pixelcharacterization elements 110. These detect whether the states of thethree bit output 108 have a specified characteristics. When the stateshave the specified characteristics, the decoder produces an output.Counters 112 count the output, effectively counting the number of timesthat the bits are coincident with the values. Therefore, the counters112 keep a count, for each frame, of the number of samples which havespecified values.

A number of thresholds are maintained by I/O register 114. Comparingelements 116 compare the counter outputs with the thresholds from theinterface register. If one or more of these thresholds are exceeded,then decision block 118 produces a command to either increment ordecrement the exposure: e.g., the shutter width or gain of imageacquisition. This can be done frame by frame, or for a group of frames.

A first embodiment uses a two-threshold simple-scheme. This takes intoaccount only the two most-significant bits. In this scheme, the relativenumber of data whose MsBs are “11” are counted. The number of data inthe lower half segment of the data scale (e.g. the most significant bit[MSB] is equal to 0) is also counted. The data “11” is considered asbeing close to saturation. An exemplary threshold for the amount of thatdata can be thirty percent. Similarly, the tolerance for “dark” data, inwhich the MSB is zero, is restricted to be 75%. Step 202 detects if thefirst threshold in which both major bits are “11” for more than thirtypercent of the data. This is taken as an overexposed condition at 204and the integration time or gain is lowered. The second threshold isinvestigated at 210. If five percent of the data is dark (MSB is 0), thedata is taken as underexposed data and the integration time or gain isincreased.

The thresholds must be selected with an amount of hysteresis which iseffective to avoid oscillations when the image has many contrasts i.e.between black and white. For example, the sum of the two percentagesshould exceed 100 percent.

FIG. 3 shows a bar graph with the overexposure/underexposure parameters.The point A in FIG. 3 is at an overexposed position. If more than 30percent of the image is in this position, then the image is taken to beoverexposed and the gain or integration time is lowered. Conversely,point B is in an, underexposed position. If more than 75 percent of theimage is in this position, then the image is taken to be underexposed.

A second embodiment which operates according to the flowchart of FIG. 4uses a three threshold advance scheme. This takes only the two highestbits at the input to the indicator, as in the first system. However,this scheme uses three decoders and three counters as shown in FIG. 1.This system counts: (a) the number of samples in which the upper bitsare “11”; (b) the number of samples in which the most significant bit is“0”; and (c) the number of samples in which the upper bits are both“00”. This provides more information about the image than the FIG. 2system. This also enables adjusting the exposure/gain in two steps.

FIG. 4 shows a flowchart of the second embodiment. At step 410, thedecision making process determines if the relative number of samplesdetermined by a, in which both MsBs are “11” is more than 75 percent. Ifso, then the image is considered to be grossly overexposed. At step 406,the exposure/gain is decremented by a higher value H.

If the result of step 410 is No, step 420 tests if the relative numberof samples is more than 30 percent. If so, the image is considered asbeing normally overexposed at 422. A tuning decrement T is applied atstep 422 where T less than H.

If the relative number of sample c, the very dark pixels, is more than75 percent at step 430, then the image is considered as seriouslyunderexposed. In this case, the exposure/gain is incremented by thehigher value H at step 432.

Finally, if none of the other steps are true, the relative number ofsamples b, that is moderately dark pixels that are not very dark, aretested at 440. If this value is more than 75 percent detected at step416, then the image is considered as moderately dark at 442. A tuningincrement T is added to the exposure or gain.

This can be carried out on a frame by frame basis. These thresholds canalso be programmable, to allow more bright or dark scenes. Theprogrammable thresholds can be made by user manual intervention, or byan automatic intervention from the computer system.

FIG. 5 shows a bar chart showing the placement of the pixels withingroups a, b, or c, similar to that in FIG. 3.

An example circuitry is shown in FIG. 6. It should be understood thatthis circuitry is exemplary only, and that other similar circuits couldbe easily formed using either a processor or hard wire gates usinghardware definition language. Of course, this operation could also becarried out using a programmed processor.

FIG. 7 shows results of a simulation using a simple test. The circuitsignals maxed during the second frame as the number of 11 sample hasexceeded 30 percent and min in the third frame as after two 00 countshas approached 75 percent of the total samples.

Although only a few embodiments have been disclosed above, othermodifications are within the disclosed features.

For example, the system as described could be carried out using aprocessor or a digital signal processor. Preferably, however, all of thesubjects in FIG. 1 are carried out on the same substrate.

1-21. (canceled)
 22. A device comprising: an analog to digital converterfor producing a plurality of digital outputs comprising a plurality ofbits, each of said digital outputs indicative of an output of at leastone pixel of an image sensor; a first counter which counts a number ofsaid digital outputs indicating overexposure during an image frame; asecond counter which counts a number of said digital outputs indicatingunderexposure during said image frame; at least one threshold detectorfor comparing counting results of said first and second counters withdesired thresholds; and a decision element for making a decision toeither increase, decrease, or maintain an exposure of a next frame ofsaid image sensor based on comparison results from the at least onethreshold detector.
 23. A device as in claim 22, wherein said at leastone threshold detector is configured to compare said counting results ona frame by frame basis.
 24. A device as in claim 22, wherein said atleast one threshold detector is configured to compare said countingresults for a group of frames.
 25. A device as in claim 22, furthercomprising first and second characterization elements configured toreview only a predetermined number of most significant bits of each ofsaid plurality of digital outputs and provide a signal to a respectiveone of said first and second counters according to said most significantbits.
 26. A device as in claim 22, wherein said first counter counts anumber of digital outputs having most significant bits including aplurality of ones, and said second counter counts a number of digitaloutputs having most significant bits including at least one zero.
 27. Adevice as in claim 26, wherein said second counter counts a number ofdigital outputs having most significant bits including a plurality ofzeros.
 28. A device as in claim 27, wherein said number of mostsignificant bits is two.
 29. A device as in claim 22, wherein saiddesired thresholds include a first value indicative of what percentageof said plurality of digital outputs can indicate overexposure and asecond value indicative of what percentage of said plurality of digitaloutputs can indicate underexposure, and wherein said decision element isconfigured to decrease said exposure of said next frame if said numbercounted by said first counter exceeds said first threshold, and toincrease said exposure of said next frame if said number counted by saidsecond counter exceeds said second threshold.
 30. A device as in claim22, further comprising a third counter which counts a number ofseriously underexposed pixels, wherein said at least one thresholddetector further compares counting results of said third counter withsaid desired thresholds.
 31. A device as in claim 30, wherein said firstcounter counts a number of said digital outputs having most significantbits including a plurality of ones, said second counter counts a numberof said digital outputs having a most significant bit of zero, and saidthird counter counts a number of said digital outputs having mostsignificant bits including a plurality of zeros.
 32. A device as inclaim 30, wherein said desired thresholds including a first valueindicative of what percentage of said plurality of digital outputs, whencounted by said first counter, indicate serious overexposure, a secondvalue indicative of what percentage of said plurality of digitaloutputs, when counted by said first counter, indicate moderateoverexposure, a third value indicative of what percentage of saidplurality of digital outputs, when counted by said third counter,indicate serious underexposure, and a fourth value indicative of whatpercentage of said plurality of digital outputs, when counted by saidsecond counter, indicate moderate underexposure.
 33. A device as inclaim 32, wherein said decision element is configured to: decrease saidexposure of said image sensor by a first amount if said count of saidfirst counter exceeds said first value; decrease said exposure of saidimage sensor by a second amount if said count of said first counterexceeds said second value; increase said exposure of said image sensorby a third amount if said count of said third counter exceeds said thirdvalue; and increase said exposure of said image sensor by a fourthamount if said count of said second counter exceeds said fourth value.34. A device as in claim 22, wherein said decision element is configuredto increase or decrease said exposure by adjusting at least one of: ashutter width of said image sensor; and a gain of said image sensor. 35.A method of controlling exposure comprising: obtaining a plurality ofdigital values representing values of pixels of an image sensor;reviewing only most significant bits of each of said digital values todetermine if each digital value indicates an overexposed pixel or anunderexposed pixel; comparing results of said determination with desiredthresholds; and adjusting exposure of a next frame of said image sensorby: decreasing said exposure if a number of overexposed pixels isgreater than or equal to a first threshold; and increasing said exposureif a number of underexposed pixels is greater than or equal to a secondthreshold.
 36. A method as in claim 35, further comprising comparingsaid results of said determination on a frame-by-frame basis.
 37. Amethod as in claim 35, further comprising comparing said results of saiddetermination for a group of frames.
 38. A method as in claim 35,wherein said step of reviewing further comprises determining that adigital value indicates: an overexposed pixel if said most significantbits of said digital value are “11”; and an underexposed pixel if a mostsignificant bit of said digital value is “0”.
 39. A method as in claim35, said step of reviewing further comprising reviewing to determine ifeach digital value indicates a seriously underexposed pixel.
 40. Amethod as in claim 39, said step of adjusting said exposure of said nextframe further comprising: if said number of overexposed pixels isgreater than or equal to a third threshold, decreasing said exposure ofsaid image sensor by a greater amount than if said number of overexposedpixels is greater than or equal to said first threshold but less thansaid third threshold; and if a number of seriously underexposed pixelsis greater than or equal to a fourth threshold, increasing said exposureof said image sensor by a greater amount than if said number ofunderexposed pixels is greater than or equal to a second threshold butsaid number of seriously underexposed pixels is less than said fourththreshold.
 41. A method as in claim 40, said step of reviewing furthercomprising determining that a digital value indicates: an overexposedpixel if said most significant bits are “11”; an underexposed pixel if amost significant bit is “0”; and a seriously underexposed pixel if saidmost significant bits are “00”.
 42. A method as in claim 35, said stepof adjusting said exposure comprising adjusting at least one of: ashutter width of said image sensor; and a gain of said image sensor. 43.A device comprising: an analog to digital converter for producing aplurality of digital outputs, each of said digital outputs indicative ofan output of at least one pixel of an image sensor; a first counterwhich counts a number of said digital outputs indicating overexposureduring at least one image frame; a second counter which counts a numberof said digital outputs indicating underexposure during said at leastone image frame; at least one comparator for comparing counting resultsof said first and second counters; and a decision element for making adecision to either increase, decrease, or maintain an exposure of asubsequent frame of said image sensor based on factors includingcomparison results from the at least one comparator.
 44. The device ofclaim 43, wherein each of said digital outputs comprises a plurality ofbits, and wherein said first and second counters count said digitaloutputs indicating overexposure and said digital outputs indicatingunderexposure according to a predetermined number of most significantbits of each of said plurality of digital outputs.
 45. The device ofclaim 43, wherein said decision element makes a decision to eitherincrease, decrease, or maintain an exposure of a next frame of saidimage sensor.
 46. The device of claim 43, wherein said comparatorcompares a count of said digital outputs indicating overexposure and acount of said digital outputs indicating underexposure.
 47. The deviceof claim 43, wherein said comparator compares a percentage of saiddigital outputs indicating overexposure and a percentage of said digitaloutputs indicating underexposure.
 48. The device of claim 43, whereinsaid comparator compares counting results of said first and secondcounters for a plurality of frames.
 49. A method of controlling exposurecomprising: obtaining a plurality of digital values representing valuesof pixels of an image sensor; reviewing each of said digital values todetermine if each digital value indicates an overexposed pixel or anunderexposed pixel; comparing a number of digital values determined toindicate overexposed pixels in said determination with a number ofdigital values determined to indicate underexposed pixels in saiddetermination; and adjusting exposure of a subsequent frame of saidimage sensor according to factors including said comparison.
 50. Themethod of claim 49, wherein each of said digital outputs comprises aplurality of bits, said step of reviewing each of said digital valuesfurther comprising reviewing only a predetermined number of mostsignificant bits of each of said plurality of digital outputs.
 51. Themethod of claim 49, wherein said step of adjusting exposure of asubsequent frame includes adjusting exposure of a next frame of saidimage sensor.
 52. The method of claim 49, wherein said step of comparingincludes comparing a count of digital values determined to indicateoverexposed pixels with a count of digital values determined to indicateunderexposed pixels.
 53. The method of claim 52, further comprisingaccumulating said count of digital values determined to indicateoverexposed pixels and said count of digital values determined toindicate underexposed pixels over a plurality of frames.
 54. The methodof claim 49, wherein said step of comparing includes comparing apercentage of digital values determined to indicate overexposed pixelswith a percentage of digital values determined to indicate underexposedpixels.
 55. The method of claim 54, further comprising accumulating saidpercentage of digital values determined to indicate overexposed pixelsand said percentage of digital values determined to indicateunderexposed pixels over a plurality of frames.